using System;
using System.Collections.Generic;
using System.Text;
using Zoo.View;
using System.Diagnostics;

namespace Zoo.Controller
{
    public class ProfileDetailController
    {

        private IProfileDetailView _view;
        private IZooModel _zooModel;
       
        public ProfileDetailController(IProfileDetailView profileDetailView,IZooModel zooModel)
        {
            _view = profileDetailView;
            _zooModel = zooModel;
            
        }

        public void Initialize()
        {
            if (_view.UserID < 1)
                _view.GoTo("Default.aspx");

            if (!_view.IsPostBack)
            {
                _view.UserIdentity = _zooModel.GetUserDetail(_view.UserID);
            }
            
        }
    }
}
